﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using System.Web;
using System.Xml.Linq;

namespace PC2PService 
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together.
    [ServiceContract]
    public interface IService1
    {
        //function to let client application subscribe to notification service.
        [OperationContract]
        void Subscribe(Guid _uniqueID, string uri, string liveId);

        //method to send toast notifications
        [OperationContract]
        void SendToastNotification(string title, string message,string liveId);

        //method to send raw notifications.
        [OperationContract]
        void SendRawNotification(string message);

        //method to send raw notifications.
        [OperationContract]
        void SendTileNotification(string imageUrl, string title, string count);

        //[OperationContract]
        //void SaveFile(byte[] myStream, string filename, string username);

        [OperationContract]
        string GetLastNotificationUrl(string username,out string type);
        [OperationContract]
        void SetStatus(string username);

        [OperationContract]
        void SavetoFile(byte[] myStream, string message, string filename, string username, string type, string endpoint,string liveId);

        [OperationContract]
        IEnumerable<XElement> GetAllNotifications(string username);

        [OperationContract]
        void DeleteHistory(string username);

        [OperationContract]
        void SaveExceptionFiletoCloud(byte[] myStream, string filename);

        [OperationContract]
        void SaveExceptiontoCloud(string message, string applicationName, string username);

        //[OperationContract]
        //void SaveLiveIds(string liveId, Guid deviceId, string ChannelUri);
       
        [OperationContract]
        string GetChannelUri(string liveId);
    }
}
